(function() {

this.pasta = this.pasta || {};
this.pasta.util = this.pasta.util || {};

this.pasta.util.ArrayList = Class.extend(
{
	init : function() 
	{
		this.data = new Array();
	},
	
	clear : function() 
	{
		this.data = new Array();
	},
	
	add : function(data) 
	{
		this.data.push(data);
	},
	
	get : function(index)
	{
		return this.data[index];
	},
	
	del : function(index)
	{
		this.data.splice(index, 1);
	},
	
	delByObject : function(data)
	{
		for (var i in this.data) 
		{
			if (this.data[i] == data)
			{
				this.del(i);
				break;
			}
		}
	},
	
	indexOf : function(data)
	{
		var result = -1;
		
		for (var i in this.data) 
		{
			if (this.data[i] == data)
			{
				result = i;
				break;
			}
		}
		
		return result;
	},
	
	getLength : function()
	{
		return this.data.length;
	}
});

})();